package pojo;

import java.io.Serializable;
import lombok.Data;

/**
 * teacher
 * @author 
 */
@Data
public class Teacher implements Serializable {
    private String teacherid;

    private String teachername;

    private Short facultyid;

    private Short jobid;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Teacher other = (Teacher) that;
        return (this.getTeacherid() == null ? other.getTeacherid() == null : this.getTeacherid().equals(other.getTeacherid()))
            && (this.getTeachername() == null ? other.getTeachername() == null : this.getTeachername().equals(other.getTeachername()))
            && (this.getFacultyid() == null ? other.getFacultyid() == null : this.getFacultyid().equals(other.getFacultyid()))
            && (this.getJobid() == null ? other.getJobid() == null : this.getJobid().equals(other.getJobid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTeacherid() == null) ? 0 : getTeacherid().hashCode());
        result = prime * result + ((getTeachername() == null) ? 0 : getTeachername().hashCode());
        result = prime * result + ((getFacultyid() == null) ? 0 : getFacultyid().hashCode());
        result = prime * result + ((getJobid() == null) ? 0 : getJobid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", teacherid=").append(teacherid);
        sb.append(", teachername=").append(teachername);
        sb.append(", facultyid=").append(facultyid);
        sb.append(", jobid=").append(jobid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}